package com.unused;

import com.corex.data.AllEnrolledClassData;
import com.corex.listadapters.AllClassesListAdpter;
import com.corex.utils.Constants;
import com.corex.vo.AllEnrolledClassDetail;
import com.corex.vo.ClassDetails;

import android.app.Activity;
import android.app.ListActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.Toast;

public class LoginSuccessActivity {
/*
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.customlist);
		
		ImageView imageView = (ImageView) findViewById(R.id.loginsuccess_list_go);
		
		AllEnrolledClassDetail allEnrolledClassDetail = AllEnrolledClassData.getAllEnrolledClassDetail();
		
		final AllEnrolledClassDetail allEnrolledClassDetailFinal = allEnrolledClassDetail;
		AllClassesListAdpter adpter = new AllClassesListAdpter(this, R.layout.classes_layout, allEnrolledClassDetail.getClassDetails());
		ListView listView = (ListView) findViewById(R.id.list);
		listView.setAdapter(adpter);
		
		listView.setOnItemClickListener(new OnItemClickListener() {

			@Override
			public void onItemClick(AdapterView<?> parent, View view, int position,
					long id) {
				//Toast.makeText(getApplication(), position, Toast.LENGTH_SHORT).show();
				Log.d("VINAYAK", ((ClassDetails)allEnrolledClassDetailFinal.getClassDetails().get(position)).getClassName());
				Intent intent = new Intent(LoginSuccessActivity.this, ClassInfoAndSelectionAction.class);
				intent.putExtra(Constants.LOGINSUCESS_SELECTED_CLASS_CODE, ((ClassDetails)allEnrolledClassDetailFinal.getClassDetails().get(position)).getClassCode());
				startActivity(intent);
			}
		});
	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
	    inflater.inflate(R.menu.timetable_menu, menu);
	    return true;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		Intent intent = new Intent(LoginSuccessActivity.this, TimetableActivity.class);
		startActivity(intent);
		return true;
	}
	*/
}
